package StrategyPattern;/** * Created by Administrator on 2018-10-17. */public class Test {    public static void main(String[] args) {//        Duck mallard = new MallardDuck();//        mallard.performFly();//        mallard.performQuack();        Duck model = new ModelDuck();        //原始modeduck        model.performFly();        model.performQuack();        //加入火箭飞行行为的modelduck (通过setFlyBehavior 方法 插入新的行为)        model.setFlyBehavior(new FlyRocketPowered());        model.performFly();    }}